package com.platform.schedule.dynamic.service;

import com.platform.schedule.dynamic.domain.DynamicScheduleInfo;

import java.util.List;

/**
 * 动态任务服务
 * <p>
 *
 * @author: WangYang
 * @date: 2018-01-05 16:20
 * @version: 1.0
 * @since 1.8
 */
public interface DynamicScheduleService {

    /**
     * 获取任务列表
     *
     * @return
     * @throws Exception
     */
    List<DynamicScheduleInfo> get() throws Exception;

    /**
     * 获取单个任务信息
     *
     * @param name
     * @return
     * @throws Exception
     */
    DynamicScheduleInfo get(String name) throws Exception;

    /**
     * 更新任务时间
     *
     * @param name
     * @param cron
     * @throws Exception
     */
    void updateCron(String name, String cron) throws Exception;
}
